package org.darkforest.common.services;

import org.darkforest.model.GoodSearchBean;
import org.darkforest.model.Goods;
import org.darkforest.model.GoodsCommon;
import org.darkforest.model.Store;
import org.darkforest.vo.PriceRange;

import java.util.List;
import java.util.Map;

/**
 * Created by Libing on 2015/7/11.
 */
public interface GoodsService {

    /**
     * 批量修改商品价格
     * @param goodsIdMap
     */
    void updateGoodsPriceBath(Map<String, Object> goodsIdMap);

    List<Goods> selectByCondition(Goods goods);

    void updateByPrimaryKeySelective(Goods goods);

    void updateByPrimaryKeySelective(GoodsCommon goodsCommon);

    /**
     * 根据主键查询商品信息
     * @param goods_id
     * @return
     */
    Goods selectGoodsByPrimaryKey(Integer goods_id);

    /**
     * 批量修改商品状态
     * @param goodsCommmonIds
     */
    void modifyGoodsStatusByBatch(String[] goodsCommmonIds, String goodsStatus);

    /**
     * 根据店铺id以及分类id下架商品
     * @param map
     */
    void soldOutStoreGoods(Map map);

    void goodsVerifyByBatch(Integer[] goodsCommonIds, Integer goodsVerify,Integer goodsStatus);

    /**
     *
     * 还原库存
     * @param goods
     */

    void restoreGoodsStorege(Goods goods);


    Map<String,Object> findPriceSaleByCondition(GoodSearchBean goods, List<PriceRange> priceJson);

    List<Map<String,Object>> findTimeRangeByCondition(GoodSearchBean goods);
}
